March 1999 { Second Workshop on Attribute Grammars and Their Applications { Waga99 Adding Semantics to Xml
نویسندگان
چکیده
Starting form the analogy between a document tagged by a markup language (XML, SGML) and a source string generated by a BNF grammar, we argue that XML parsers should beneet from the addition of semantic attributes and functions. Currently XML only includes initialized lexical attributes. By our approach a XML parser would be extended into a syntax-directed translator. Deep transformations of a document could be speciied, sent over the network, and executed within the XML system. For the speciication of the semantic attributes and functions we propose a XML Document Type Deenition, that is conceptually similar to the metalanguage of a compiler-compiler. By this approach the additions to the XML standard are kept to a minimum. The diierences between attribute grammars and attributed XML speciications are discussed, and the system architecture of a semantic evaluator generator is presented.
منابع مشابه
March 1999 { Second Workshop on Attribute Grammars and Their Applications { Waga99 on Eliminating Type 3 Circularities of Ordered Attribute Grammars
Ordered attribute grammars (OAGs for short) are a useful class of attribute grammars (AGs). For some attribute grammars, even though they are not circular, OAG circularity test reports that they are not ordered and fails to generate attribute evaluators because some approximation introduces circularities(called type 3 circularities in this paper). First we discuss that it is sometimes diicult f...
متن کاملMarch 1999 { Second Workshop on Attribute Grammars and Their Applications { Waga99 a Nest Partitioning Algorithm for Attribute Grammars
The attribute dependence graph of a syntax tree may be partitioned into disjoint regions. Attribute instances in diierent regions are independent of one other. The advantages of partitioning the attribute dependence graph include simplifying the attribute grammar conceptually and allowing the possibility of parallel evaluation. We present a static partitioning algorithm for attribute grammars. ...
متن کاملXML Semantics
In this chapter, we consider the problem of checking the consistency of the semantics associated with extensible markup language (XML) documents. We propose a novel technique to add semantics to XML documents by attaching semantic information to the XML element tag attributes. We call this technique XML semantics. It is based on the same concept as attribute grammars (AGs), attaching and checki...
متن کاملExtensions of Attribute Grammars for Structured Document Queries
Widely-used document speciication languages like, e.g., SGML and XML, model documents using extended context-free grammars. These diier from standard context-free grammars in that they allow arbitrary regular expressions on the right-hand side of productions. To query such documents, we introduce a new form of attribute grammars (extended AGs) that work directly over extended context-free gramm...
متن کاملJuly 2000 Third Workshop on Attribute Grammars and Their Applications Waga2000 Attribute Grammars as Record Calculus a Structure-oriented Denotational Semantics of Attribute Grammars by Using Cardelli's Record Calculus
In this paper, we present a new denotational semantics of attribute grammars (AGs) by using Cardelli's record calculus. This new denotational semantics is simple, natural and structure-oriented. AGs have been considered useful in describing interactive programming environments as well as in specifying the semantics of programming languages. Using AGs, interactive programming environments are of...
متن کامل